package demo2;

import java.util.Scanner;

public class Test {
    public static void login(User user) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入用户名");
        String name = scanner.nextLine();
        System.out.print("请输入密码");
        String password = scanner.nextLine();
        try {
            user.name.equals(name);
        }catch(NameErrorException e) {
            e.printStackTrace();
        }catch(NullPointerException e) {
            e.printStackTrace();
        }



    }
    public static void main(String[] args) {
        User user = new User();
        login(user);
    }

}


